Skip to content

fix: refresh the drill sandbox image on every run and name the pg_attver failure (2.11.2) - #73

Merged
supertj merged 8 commits into
mainfrom
feature/drill-sandbox-refresh
Nov 24, 2026
Merged

supertj merged 8 commits into
mainfrom
feature/drill-sandbox-refresh

Conversation

@supertj

@supertj supertj commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

What happened

On 2026-11-24 a scheduled drill failed for a project whose database Supabase had moved to the November 2026 PostgreSQL security release (CVE-2026-6460). With that release, a pg_dump that predates it writes ALTER TABLE ... ALTER COLUMN ... SET (pg_attver=...) for every column. The drill sandbox was still postgres:17-alpine at 17.10, because the drill pulled its image only when it wasn't local, and 17.10 rejects that line as an unrecognized parameter, so every CREATE TABLE failed. 17.12 accepts and ignores it. The failure was also misattributed to supabase_vault, since the follow-on "type ... does not exist" errors matched the missing-extension check.

Changes (2.11.2)

  • Sandbox image refresh: every drill pulls the sandbox image even when it is cached. If that refresh fails or takes more than 5 minutes, the drill uses the cached image and prints a warning (with Docker's own message). On timeout or interrupt, the pull and its credential helper are killed together. The pull stays in the drill's process group, so whoever stops the drill by group still ends it. docker run gets --pull=never, so it can't pull a second time outside these limits.
  • Diagnosis: a pre-data failure whose primary error is unrecognized parameter "pg_attver" is now reported as an outdated sandbox, ahead of the missing-extension attribution. restore gives matching advice when the target is the older version. Both match only the primary error, not statement text.
  • README: documents the refresh and the cached-image fallback.

Verification

  • 485 tests pass, including new ones for a cached image with a successful, failing and hung pull (the hung case checks that the helper is stopped), killing the drill's process group during a hung pull, and the classifier and restore advice (including negative cases).
  • End to end on a Mac: dumped a 17.12 server with pg_dump 17.10, which produced the pg_attver lines. With a stale 17.10 sandbox and the refresh failing, the drill now prints the pg_attver explanation. With a real refresh, it pulls 17.12 and the drill passes.

Cross-review

This repo is public, so the raw reviewer output is archived locally rather than pasted here. There were five Codex code rounds; the last one, from the pre-push hook on b2e07de, found 0 blockers. One copy round covered the changed messages and one covered the README. Every finding is answered in the archive.

The plugin's pinned backupdrill@2.11.0 will be bumped in a follow-up PR after 2.11.2 is published to npm.

…ver failure (2.11.2)

The drill pulled its sandbox image (postgres:17-alpine, pgvector/pgvector:pg17)
only when it wasn't local, so a long-lived worker stayed on whatever minor
version it pulled first. On 2026-11-24 a drill failed for a project that
Supabase had moved to the November 2026 security release (CVE-2026-6460):
a pre-update pg_dump writes "ALTER COLUMN ... SET (pg_attver=...)" for such
databases, PostgreSQL 17.10 rejects it as an unrecognized parameter, and
every CREATE TABLE in the dump failed. 17.12 accepts and ignores the line.

- ensureImage now runs docker pull even when the image is local. If that
  refresh fails (offline, rate limited) or takes over 5 minutes, the drill
  falls back to the local copy with a warning instead of failing.
- A pg_attver rejection is reported as what it is, ahead of the missing-
  extension attribution that previously blamed supabase_vault.
- restore adds the same explanation when the target is the older one.
… run, match only the primary pg_attver error

Co-review round 1 fixes.
… pg_attver from each failure's primary error

Co-review round 2 fixes.
…t the pg_attver classifier on the alert's failures

Co-review round 3 fixes.
…k when one is cached; tests pull only on a cache miss
@supertj
supertj merged commit bab7615 into main Nov 24, 2026
1 check passed
@supertj
supertj deleted the feature/drill-sandbox-refresh branch November 24, 2026 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant